package com.evildog.workspace.generator.gene;

import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
import com.baomidou.mybatisplus.generator.config.TemplateConfig;

/**
 * 适合link等不需要Controller，只需要service,mapper
 */
public class DefaultGenerator extends BaseGenerator {

    @Override
    protected PackageConfig getPackageConfig() {
        String applicationName = "application.";

        PackageConfig pc = new PackageConfig();
        pc.setModuleName(moduleName);
        pc.setParent(packageName);
        pc.setController(applicationName + "controller");
        pc.setEntity(applicationName + "entity");
        pc.setXml(applicationName + "mapper.xml");
        pc.setMapper(applicationName + "mapper");
        pc.setService(applicationName + "service");
        pc.setServiceImpl(applicationName + "service.impl");
        return pc;
    }

    @Override
    protected TemplateConfig getTemplateConfig(){
        return null;
    }

    @Override
    protected InjectionConfig getInjectionConfig() {

        return new InjectionConfig() {
            @Override
            public void initMap() {

            }
        };
    }

}
